linux (suse)平台swap空间的调整方法 您所在的位置:网站首页 linux swap 扩容 linux (suse)平台swap空间的调整方法

linux (suse)平台swap空间的调整方法

#linux (suse)平台swap空间的调整方法 | 来源: 网络整理| 查看: 265

[size=large][/size]1.查看系统Swap空间使用

# free total used free shared buffers cached Mem: 513980 493640 20340 0 143808 271780 -/+ buffers/cache: 78052 435928 Swap: 1052248 21256 1030992

2.在空间合适处创建swap文件

# mkdir swap # cd swap # dd if=/dev/zero of=swapfile bs=1024 count=10000 //说明: count的值就是要增加的swap的大小,目前添加的大小大致为10M 10000+0 records in 10000+0 records out # ls -al total 10024 drwxr-xr-x 2 root root 4096 7月 28 14:58 . drwxr-xr-x 19 root root 4096 7月 28 14:57 .. -rw-r--r-- 1 root root 10240000 7月 28 14:58 swapfile

# mkswap swapfile Setting up swapspace version 1, size = 9996 KiB

3.激活swap文件 # swapon swapfile # ls -l total 10016 -rw-r--r-- 1 root root 10240000 7月 28 14:58 swapfile # free total used free shared buffers cached <



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有